Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace builtin-modules package with node's isBuiltin check #2176

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rubiesonthesky
Copy link
Collaborator

PR Checklist

Overview

There is no need to use external package for this check, when we can use node's own isBuiltin() check. However, it needed minimum node version to be upgrade to >=18.6.

🐙

@@ -43,7 +39,6 @@ export const createInstallMissingTypesProvider = () => {
const missingPackageNames = setSubtract(
referencedPackageNames,
new Set(existingPackageNames),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, should we give existingPackageNames as a parameter for collectReferencedPackageNames and we could do the check already there, so we didn't need to go through the list again here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that change in second commit. Instead of using setSubsctract, we never add existingPackageNames to the list in the first place.
It's not exactly what this task / PR was about, so that commit could be removed and I can submit it separately. On the other hand, I think it's pretty simple change.

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

Attention: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.85%. Comparing base (a505078) to head (9278e34).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ime/providers/createInstallMissingTypesProvider.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2176      +/-   ##
==========================================
+ Coverage   74.81%   75.85%   +1.03%     
==========================================
  Files         171      170       -1     
  Lines        7108     7106       -2     
  Branches     1049     1074      +25     
==========================================
+ Hits         5318     5390      +72     
+ Misses       1785     1711      -74     
  Partials        5        5              
Flag Coverage Δ
mutation 69.61% <14.28%> (-0.03%) ⬇️
unit 14.62% <90.47%> (+2.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🛠 Tooling: Replace builtin-modules with node's own isBuiltin
1 participant